让c++ 函数返回一个数组
在c++中是不允许数组作为函数的返回值的 int [] someFunction( ); //ILLEGAL 要想实现函数返回一个数组,那返回对应数组里面类型的指针 you must ret ...
在c++中是不允许数组作为函数的返回值的 int [] someFunction( ); //ILLEGAL 要想实现函数返回一个数组,那返回对应数组里面类型的指针 you must ret ...
//直接声明为 int a[], 这样会允许函数内部对a[] 进行修改 void showTheWorld( int a[], int sizeOfa) { for ( int i = 0; ...